#include "HTTPServer.hpp"
#include <memory>

using namespace std;

// ./httpserver 8080
static void Usage(const string& proc)
{
    cout << "\r\n Usage: " << proc << "  local port\r\n"
         << endl;
}
int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(1);
    }
    uint16_t port = atoi(argv[1]);
    unique_ptr<HTTPServer> httpsvr(new HTTPServer(port));
    httpsvr->InitServer();
    httpsvr->Start();
    return 0;
}